<?php
	include "../../public/commom/config.php";
	include "../lock1.php";	
?>

<!DOCTYPE html>
<html>
	
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	
	<body>
		<div>
			<form action="xiugai1.php" method="post">
				<?php if($_GET) {$code = $_GET["code"];} ?>
				订单号：<input type="text" name"code" value="<?php echo $code; ?>" disabled="disabled" /><br />
				状态：
				<select name="status_id">
					<?php
						if($_GET) {
							$id = $_GET["id"];
							$sid = $_GET["status"];
							
							$sql = "SELECT * FROM status";
							
							$result = mysqli_query($conn, $sql);
							
							while($row = mysqli_fetch_array($result)) {
								if($row["id"] == $sid) {
									echo "<option value=" . $row["id"] . " selected>" . $row["name"] . "</option>";
								}else {
									echo "<option value=" . $row["id"] . ">" . $row["name"] . "</option>";
								}
								
							}
						}
						
						mysqli_close($conn);
					?>
				</select><br />
				<input type="hidden" name="code" value="<?php echo $code; ?>" />
				<input type="submit" value="修改" />
			</form>
		</div>
	</body>
	
</html>